libubox: Add ability to find ordinal position inside a table master
authorPhilip Prindeville <[email protected]>
Fri, 14 Nov 2025 19:04:01 +0000 (12:04 -0700)
committerÁlvaro Fernández Rojas <[email protected]>
Mon, 8 Dec 2025 13:59:11 +0000 (14:59 +0100)
commit7928f1711703767b0ac5ce916c7231d0e1af1ca2
tree67d7815c30aa5f93f86b880660554fb161f800b6
parentecddb31dc34d89be5c9dc4595a4c58070eb090e4
libubox: Add ability to find ordinal position inside a table

When adding anonymous objects to an array, the only way to select
those objects (as in "json_select", i.e. moving the cursor) is to
select them via their ordinality.

This function returns a selectable index to those objects.

Signed-off-by: Philip Prindeville <[email protected]>
Link: https://github.com/openwrt/libubox/pull/33
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
sh/jshn.sh
tests/shunit2/tests.sh